RiverDrainage Module

History

current version 1.2 - 22nd April 2024

version date comment
1.0 10/Feb/2023 Original code
1.1 18/Apr/2024 ChannelInitiation modified for following DischargeRouting update
1.2 22/Apr/2024 Flow direction convention imported from Morphology

License

license: GNU GPL http://www.gnu.org/licenses/

Module Description

routines to define river network scheme for discharge routing The original algorithms were initially implemented in a standalone program used to prepare input file to FEST. Starting from 2023 FEST release, river network topology orgamìnization is computed within the FEST before starting the simulation from the flow direction and flow accumulation maps.



Variables

Type Visibility Attributes Name Initial
type(ReachesList), private, POINTER :: current
type(ReachesList), private, POINTER :: list
type(ReachesList), private, POINTER :: previous

Derived Types

type, public ::  Reach

Components

Type Visibility Attributes Name Initial
real(kind=float), public :: area

area drained by end section (m2)

integer, public :: i0

beginning of reach row

integer, public :: i1

end of reach row

integer, public :: id
integer, public :: j0

beginning of reach column

integer, public :: j1

end of reach column

real(kind=float), public :: length

reach length (m)

integer, public :: ncells

number of cells in a reach

integer, public :: order

Horton-Sthraler order

real(kind=float), public :: slope

average reach slope (m/m)

real(kind=float), public :: x0

beginning of reach x coordinate

real(kind=float), public :: x1

end of reach x coordinate

real(kind=float), public :: y0

beginning of reach y coordinate

real(kind=float), public :: y1

end of reach y coordinate

type, public ::  ReachNetwork

Components

Type Visibility Attributes Name Initial
type(Reach), public, POINTER :: branch(:)
integer, public :: nreach

type, public ::  ReachesList

Components

Type Visibility Attributes Name Initial
real(kind=FLOAT), public :: area
integer, public :: i0
integer, public :: i1
integer, public :: id
integer, public :: j0
integer, public :: j1
real(kind=FLOAT), public :: length
integer, public :: n_cells
type(ReachesList), public, POINTER :: next
integer, public :: order
real(kind=FLOAT), public :: slope
real(kind=FLOAT), public :: x0
real(kind=FLOAT), public :: x1
real(kind=FLOAT), public :: y0
real(kind=FLOAT), public :: y1

Subroutines

public subroutine BuildReachNetwork(maxReachLength, slopeCorrection, flowDirection, flowAcc, dem, fileExport, shpExport, streamNetwork)

Build reaches that compose the river network

Arguments

Type IntentOptional Attributes Name
real(kind=float), intent(in) :: maxReachLength

max length of a reach (m)

real(kind=float), intent(in) :: slopeCorrection

slope value to correct negative values

type(grid_integer), intent(in) :: flowDirection

flow direction

type(grid_integer), intent(in) :: flowAcc

flow accumulation

type(grid_real), intent(in) :: dem

digital elevation model

integer(kind=short), intent(in) :: fileExport
integer(kind=short), intent(in) :: shpExport
type(ReachNetwork), intent(out) :: streamNetwork

public subroutine ChannelInitiation(method, threshold, mask, flowAcc, flowDir, dem, channel)

Define channel cells. Two methods are possible:

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: method
real(kind=float), intent(in) :: threshold
type(grid_integer), intent(in) :: mask
type(grid_integer), intent(in) :: flowAcc
type(grid_integer), intent(in) :: flowDir
type(grid_real), intent(in) :: dem
type(grid_integer), intent(inout) :: channel

public subroutine MarkOrderBeginning(orders, flowDirection, orderBeginning)

Define cells where the beginning of a reach of different order takes place.

Arguments

Type IntentOptional Attributes Name
type(grid_integer), intent(in) :: orders
type(grid_integer), intent(in) :: flowDirection
type(grid_integer), intent(inout) :: orderBeginning

private subroutine ExportReaches()

Export reaches on file

Arguments

None

private subroutine ExportShape(dem, flowDirection)

export shape file of river network

Read more…

Arguments

Type IntentOptional Attributes Name
type(grid_real), intent(in) :: dem
type(grid_integer), intent(in) :: flowDirection

private subroutine SplitNetwork(orders, flowDirection, split)

Split channel network where a confluence of two different horton order channels occurs

Arguments

Type IntentOptional Attributes Name
type(grid_integer), intent(in) :: orders
type(grid_integer), intent(in) :: flowDirection
type(grid_integer), intent(inout) :: split